<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "/jspgou_sys/head.html"/>
<script type="text/javascript">
function optDelete() {
	if(Pn.checkedCount('ids')<=0) {
		alert("<@s.m 'error.checkRecord'/>");
		return;
	}
	if(!confirm("<@s.m 'global.confirm.delete'/>")) {
		return;
	}
	var f = document.getElementById('tableForm');
	f.action="o_delete.do";
	f.submit();
}
</script>
</head>
<body>
<div class="body-box">
<div class="rhead">
	<div class="rpos"><@s.m "global.position"/>: <@s.m "template.function"/> - <@s.m "global.list"/></div>
	<form class="ropt">
	    <input type="hidden" name="root" value="${root}"/>
		<@s.m "template.createDir"/>: <input type="text" name="dirName" size="10" onkeypress="if(event.keyCode==13){$('#dirButton').click();return false;}"/>
		<input id="dirButton" type="submit" value="<@s.m "global.submit"/>" onclick="this.form.action='o_create_dir.do';"/>
&nbsp; <input type="submit" value="<@s.m "template.create"/>" onclick="this.form.action='v_add.do';"/>
		<input type="hidden" name="relPath" value="${relPath!}"/>
	</form>
	<div class="clear"></div>
</div>
<form id="tableForm" method="post">
<@p.table value=list;template,i,has_next><#rt/>
	<@p.column title="<input type='checkbox' onclick='Pn.checkbox(\"ids\",this.checked)'/>" width="20">
		<input type="checkbox" name="ids" value="${template.name}"/><#t/>
	</@p.column><#t/>
	<@p.column code="template.name"><img src="${base}/res/common/img/file/${template.directory?string('folder','html')}.gif"/> ${template.filename}
       </@p.column><#t/>
	<@p.column code="template.size" align="right">${template.size} KB</@p.column><#t/>
	<@p.column code="template.lastModified" align="center">${template.lastModifiedDate?string('yyyy-MM-dd HH:mm:ss')!}</@p.column><#t/>
	<@p.column code="global.operate" align="center">
		<a href="v_rename.do?root=${root?url}&name=${template.name?url}"><@s.m "template.rename"/></a> | <#rt/>
		<#if !template.directory><a href="v_edit.do?root=${root?url}&name=${template.name?url}"><@s.m "global.edit"/></a> | <#rt/></#if>
		<a href="o_delete_single.do?root=${root?url}&name=${template.name?url}" onclick="if(!confirm('<@s.m "global.confirm.delete"/>')) {return false;}"><@s.m "global.delete"/></a><#t/>
	</@p.column><#t/>
</@p.table>
<div>
	<input type="hidden" name="relPath" value="${relPath!}"/>
	<input type="button" value="<@s.m "global.delete"/>" onclick="optDelete();"/>
</div>
</form>
</div>
<#include "/common/alert_message.html"/>
</body>
</html>